﻿using System;
using System.Reflection;

namespace Ue.Aop.Fody.Samples.Methods
{
    public class MethodDecoratorAttribute : MethodDecoratorBase
    {
        public override void OnEntry(object sender, MethodBase method)
        {
            this.Sender = sender;
            this.Method = method;
        }

        public override void OnExit(object sender, MethodBase method, object returnValue)
        {
            this.Sender = sender;
            this.Method = method;
            this.ReturnValue = returnValue;
        }

        public override void OnException(object sender, MethodBase method, Exception exception)
        {
            this.Sender = sender;
            this.Method = method;
            this.Exception = exception;
        }
    }
}
